<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InfdFilesystemStorage</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
<link rel="home" href="index.html" title="libinfinity-0.4 Reference Manual">
<link rel="up" href="ch05.html" title="Libinfinity server side API">
<link rel="prev" href="libinfinity-0.4-infd-storage.html" title="infd-storage">
<link rel="next" href="InfdSessionProxy.html" title="InfdSessionProxy">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libinfinity-0.4-infd-storage.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch05.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinfinity-0.4 Reference Manual</th>
<td><a accesskey="n" href="InfdSessionProxy.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#InfdFilesystemStorage.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#InfdFilesystemStorage.description" class="shortcut">Description</a>
                   | 
                  <a href="#InfdFilesystemStorage.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#InfdFilesystemStorage.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#InfdFilesystemStorage.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry" title="InfdFilesystemStorage">
<a name="InfdFilesystemStorage"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="InfdFilesystemStorage.top_of_page"></a>InfdFilesystemStorage</span></h2>
<p>InfdFilesystemStorage</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="InfdFilesystemStorage.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">enum                <a class="link" href="InfdFilesystemStorage.html#InfdFilesystemStorageError" title="enum InfdFilesystemStorageError">InfdFilesystemStorageError</a>;
                    <a class="link" href="InfdFilesystemStorage.html#InfdFilesystemStorage-struct" title="InfdFilesystemStorage">InfdFilesystemStorage</a>;
                    <a class="link" href="InfdFilesystemStorage.html#InfdFilesystemStorageClass" title="InfdFilesystemStorageClass">InfdFilesystemStorageClass</a>;
<a class="link" href="InfdFilesystemStorage.html" title="InfdFilesystemStorage"><span class="returnvalue">InfdFilesystemStorage</span></a> * <a class="link" href="InfdFilesystemStorage.html#infd-filesystem-storage-new" title="infd_filesystem_storage_new ()">infd_filesystem_storage_new</a>     (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *root_directory</code></em>);
<span class="returnvalue">FILE</span> *              <a class="link" href="InfdFilesystemStorage.html#infd-filesystem-storage-open" title="infd_filesystem_storage_open ()">infd_filesystem_storage_open</a>        (<em class="parameter"><code><a class="link" href="InfdFilesystemStorage.html" title="InfdFilesystemStorage"><span class="type">InfdFilesystemStorage</span></a> *storage</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *identifier</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *mode</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="InfdFilesystemStorage.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----InfdFilesystemStorage
</pre>
</div>
<div class="refsect1" title="Implemented Interfaces">
<a name="InfdFilesystemStorage.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
InfdFilesystemStorage implements
 <a class="link" href="libinfinity-0.4-infd-storage.html#InfdStorage">InfdStorage</a>.</p>
</div>
<div class="refsect1" title="Properties">
<a name="InfdFilesystemStorage.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="InfdFilesystemStorage.html#InfdFilesystemStorage--root-directory" title='The "root-directory" property'>root-directory</a>"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1" title="Description">
<a name="InfdFilesystemStorage.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="InfdFilesystemStorage.details"></a><h2>Details</h2>
<div class="refsect2" title="enum InfdFilesystemStorageError">
<a name="InfdFilesystemStorageError"></a><h3>enum InfdFilesystemStorageError</h3>
<pre class="programlisting">typedef enum _InfdFilesystemStorageError {
  /* The path contains invalid characters */
  INFD_FILESYSTEM_STORAGE_ERROR_INVALID_PATH,
  /* Failed to remove files from disk */
  INFD_FILESYSTEM_STORAGE_ERROR_REMOVE_FILES,

  INFD_FILESYSTEM_STORAGE_ERROR_FAILED
} InfdFilesystemStorageError;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="InfdFilesystemStorage">
<a name="InfdFilesystemStorage-struct"></a><h3>InfdFilesystemStorage</h3>
<pre class="programlisting">typedef struct _InfdFilesystemStorage InfdFilesystemStorage;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="InfdFilesystemStorageClass">
<a name="InfdFilesystemStorageClass"></a><h3>InfdFilesystemStorageClass</h3>
<pre class="programlisting">typedef struct {
  GObjectClass parent_class;
} InfdFilesystemStorageClass;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="infd_filesystem_storage_new ()">
<a name="infd-filesystem-storage-new"></a><h3>infd_filesystem_storage_new ()</h3>
<pre class="programlisting"><a class="link" href="InfdFilesystemStorage.html" title="InfdFilesystemStorage"><span class="returnvalue">InfdFilesystemStorage</span></a> * infd_filesystem_storage_new     (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *root_directory</code></em>);</pre>
<p>
Creates a new <a class="link" href="InfdFilesystemStorage.html" title="InfdFilesystemStorage"><span class="type">InfdFilesystemStorage</span></a> that stores its nodes in the
given directory on the file system. The directory is created if it does
not exist.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>root_directory</code></em> :</span></p></td>
<td>A directory name in UTF-8.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A new <a class="link" href="InfdFilesystemStorage.html" title="InfdFilesystemStorage"><span class="type">InfdFilesystemStorage</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="infd_filesystem_storage_open ()">
<a name="infd-filesystem-storage-open"></a><h3>infd_filesystem_storage_open ()</h3>
<pre class="programlisting"><span class="returnvalue">FILE</span> *              infd_filesystem_storage_open        (<em class="parameter"><code><a class="link" href="InfdFilesystemStorage.html" title="InfdFilesystemStorage"><span class="type">InfdFilesystemStorage</span></a> *storage</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *identifier</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *mode</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Opens a file in the given path within the storage's root directory. If
the file exists already, and <em class="parameter"><code>mode</code></em> is set to "w", the file is overwritten.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>storage</code></em> :</span></p></td>
<td>A <a class="link" href="InfdFilesystemStorage.html" title="InfdFilesystemStorage"><span class="type">InfdFilesystemStorage</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>identifier</code></em> :</span></p></td>
<td>The type of node to open.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>Tha path to open.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>Either "r" for reading or "w" for writing.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Location to store error information, if any.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A stream for the open file. Close with <code class="function">fclose()</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="Property Details">
<a name="InfdFilesystemStorage.property-details"></a><h2>Property Details</h2>
<div class="refsect2" title='The "root-directory" property'>
<a name="InfdFilesystemStorage--root-directory"></a><h3>The <code class="literal">"root-directory"</code> property</h3>
<pre class="programlisting">  "root-directory"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>The directory in which the storage stores its content.</p>
<p>Default value: NULL</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15</div>
</body>
</html>